package com.jm.springboot21.mapper;

import com.jm.springboot21.pojo.Emp;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface EmpMapper {
    List<Emp> findAll();
    void addEmp(Emp emp);
    //根据id查询员工
    Emp findById(int id);
    List<Emp> findByName(String name);

    void deleteById(int id);
//    多选删除
    void deleteByIds(List<Integer> ids);
    void updateById(Emp emp);
//总人数
    @Select("select count(*) from emp")
    Integer count();
}
